import request from '@/utils/request'

/**
 * @description: 保存销售退货单
 * @param {*} params
 * @return {*}
 */
export function saveXsthdOrder(data) {
  return request({
    url: '/order/xsthd/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取销售退货单清单
 * @param {*} data
 * @return {*}
 */
export function getXsthdOrderList(params) {
  return request({
    url: '/order/xsthd/list',
    method: 'get',
    params
  })
}

/**
 * @description: 获取销售退货单详情
 * @param {*} params
 * @return {*}
 */
export function getXsthdDetail(params) {
  return request({
    url: '/order/xsthd/detail',
    method: 'get',
    params
  })
}

/**
 * @description: 单据、反审核
 * @param {*} data
 * @return {*}
 */
export function examineXsthd(data) {
  return request({
    method: 'post',
    url: '/order/xsthd/examine',
    data
  })
}

/**
 * @description: 更新销售订单
 * @param {*} data
 * @return {*}
 */
export function updateXsthd(data) {
  return request({
    url: '/order/xsthd/update',
    method: 'post',
    data
  })
}

/**
 * @description: 销售退货单删除
 * @param {*} data
 * @return {*}
 */
export function deleteXsthd(data) {
  return request({
    url: '/order/xsthd/delete',
    method: 'post',
    data
  })
}
